{% extends 'dash/index.html' %}
{% block 'content_show' %}
<!-- block 模块 -->
<!-- title -->
<div class="container-fluid am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-9">
            <div class="page-header-heading">
            	<span class="am-icon-home page-header-heading-icon"></span> 
            	用户修改 
            	<small>User edit</small>
            </div>
        </div>
    </div>
</div>
<!-- END title -->

<!-- 修改用户信息 -->
<div class="row">
    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
        <div class="widget am-cf">
            <div class="widget-body am-fr">
            	<!-- 提交用户信息表单 -->
                <form action="{% url 'dash_edit_user' %}" class="am-form tpl-form-line-form" method="post" enctype="multipart/form-data">
                	{% csrf_token %}
                	<!-- 用户名 -->
                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">用户名
                        	<span class="tpl-form-line-small-title">:</span>
                        </label>
                        <div class="am-u-sm-9">
                            <input value="{{ user_info.username }}" name="username" type="text" class="tpl-form-input">
                        </div>
                    </div>
                    <!-- END用户名 -->

                    <!-- 手机号 -->
                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">手机号 
                        	<span class="tpl-form-line-small-title">:</span>
                        </label>
                        <div class="am-u-sm-9">
                            <input value="{{ user_info.phone }}" name="phone" type="text" class="tpl-form-input">
                        </div>
                    </div>
                    <!-- END手机号 -->

                    <!-- 性别 -->
                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">性别
                        	<span class="tpl-form-line-small-title">:</span>
                        </label>
                        <div class="am-u-sm-9">
                           <label><input type="radio" name="gender" value="1" {% if user_info.gender == 1 %} checked {% endif %} > 男</label>
                           <label><input type="radio" name="gender" value="0" {% if user_info.gender == 0 %} checked {% endif %} > 女</label>
                        </div>
                    </div>
                    <!-- 性别END-->

                    <!-- 收货地址 -->
                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">收货地址 
                        	<span class="tpl-form-line-small-title">:</span>
                        </label>
                        <div class="am-u-sm-9">
                            <input value="{{ user_info.address }}" name="address" type="text" class="tpl-form-input">
                        </div>
                    </div>
                    <!-- END收货地址 -->

                    <!-- 邮编 -->
                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">邮编 
                        	<span class="tpl-form-line-small-title">:</span>
                        </label>
                        <div class="am-u-sm-9">
                            <input value="{{ user_info.code }}" name="code" type="text" class="tpl-form-input">
                        </div>
                    </div>
                    <!-- END邮编 -->

                    <!-- 上传头像 -->
                   	<div class="am-form-group">
                        <label for="user-weibo" class="am-u-sm-3 am-form-label">上传头像
                        	<span class="tpl-form-line-small-title">:</span>
                        </label>
                        <div class="am-u-sm-9">
                            <div class="am-form-group am-form-file">
                                <div class="tpl-form-file-img">
                                    <img width="200" src="/static/dash/pics/{{ user_info.head_img }}" alt="">
                                </div>
                                <button class="am-btn am-btn-danger am-btn-sm">
									<i class="am-icon-cloud-upload"></i>
									添加头像图片
								</button>
                                <input name="head_img" type="file" multiple="">
                            </div>
                        </div>
                    </div>
                    <!-- END上传头像 -->

                    <!-- 用户状态 -->
                 	<div class="am-form-group">
                        <label for="user-phone" class="am-u-sm-3 am-form-label">用户状态
                        	<span class="tpl-form-line-small-title">:</span>
                        </label>
                        <div class="am-u-sm-9">
                        	<select name="state" data-am-selected="{searchBox: 1}" style="display:none;">
                            	<option value="0" {% if user_info.state == 0 %} selected {% endif %} >
                                    管理员
                                </option>
                            	<option value="1" {% if user_info.state == 1 %} selected {% endif %} >
                                    普通用户
                                </option>
                            	<option value="2" {% if user_info.state == 2 %} selected {% endif %}>
                                    封禁中
                                </option>
                        	</select>
                        </div>
                    </div>
                    <!-- END用户状态-->

                    <!-- hidden域隐藏携带 -->
                        <input type="hidden" name="uid" value="{{ user_info.id }}">
                    <!-- ENDhidden域隐藏携带 -->


                    <br/>
                    <!-- 提交表单按钮 -->
                    <div class="am-form-group">
                        <div class="am-u-sm-9 am-u-sm-push-3">
                            <button class="am-btn am-btn-primary tpl-btn-bg-color-success ">提交</button>
                        </div>
                    </div>
                    <!-- END提交表单按钮 -->
                </form>
                <!-- END提交用户信息表单 -->
            </div>
        </div>
    </div>
</div>
<!-- END 修改用户信息 -->

<!-- END block 模块 -->
{% endblock %}